package com.example.perpetualcalendar.domain.entity;

import android.text.TextUtils;

import com.example.perpetualcalendar.constant.AppConst;

import java.text.SimpleDateFormat;
import java.util.Date;

public class CalenderRequest {
    private String key;
    private String date;

    public CalenderRequest(String date) {
        this.key = AppConst.CALENDER_KEY;
        if(TextUtils.isEmpty(date)){
            SimpleDateFormat format = new SimpleDateFormat("YYYY-M-d");
            this.date = format.format(new Date());
        }else {
            this.date = date;
        }
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }
}
